﻿

using System;
using Demo.Domain;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace Demo.Domain
{
    public class RoleModuleMapping : EntityTypeConfiguration<RoleModule>
    {
        public RoleModuleMapping()
        {
            this.HasKey(r => r.RoleModuleID).Property(r => r.RoleModuleID).IsRequired().HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(r => r.ModuleID).IsRequired();
            this.Property(r => r.RoleID).IsRequired();
        }
    }
}
